package com.smashedapples.sandbox.explorer.microsoft.sqlserver
{
	import smashedapples.core.Command;
	import smashedapples.core.Controller;
	import smashedapples.microsoft.sqlserver.commands.SaveCommand;


	public class SqlServerController extends Controller
	{

		public function get sqlServerView():SqlServerView
		{
			return this.$view as SqlServerView;
		}
		
		public function onSearch(event:AppEvent):void
		{
			var args : Object = sqlServerView.searchForm.getData();
			Debug.push( this, args );
			sqlServerView.model.GetTests.send( args );
		}
		
		public function onSave(event:AppEvent):void
		{
			var data : Object = sqlServerView.form.getData();
			
			sqlServerView.model.server.save( "TEST", data );
				
			Debug.push( this, data );
		}
		
		
		
		
		
	}
}